import requests
from bs4 import BeautifulSoup
import lxml


urls = [
    f"https://www.cnblogs.com/#p{page}"
    for page in range(1,50+1)
]

def craw(url):
    r = requests.get(url)
    return r.text


def parse(html):
    soup = BeautifulSoup(html,"lxml")
    links = soup.find_all("a", class_="post-item-title")
    return [(link["href"],link.get_text()) for link in links]

if __name__ == "__main__":
    for title in parse(craw(urls[2])):
        print (title)